<%-- 
    Document   : movieList
    Created on : May 1, 2013, 5:39:55 PM
    Author     : DevSteve
--%>
<%@page import="java.util.List"%>
<%@page import="java.io.FileReader"%>
<%@page import="java.io.IOException"%>
<%@page import="java.io.BufferedReader"%>
<%@page import="java.io.InputStreamReader"%>
<%@page import="java.io.FileNotFoundException"%>
<%@page import="java.io.FileInputStream"%>
<%@page import="java.io.File"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.Statement"%>
<%@page import="java.sql.Connection"%>
<%@page import="db.DB"%>
<%@page import="db.MovieObj"%>

<%
    String ide = request.getParameter("id");
    int num = Integer.parseInt(ide);
    String email = request.getParameter("email");
    String lastName = request.getParameter("lastName");
    String firstName = request.getParameter("firstName");
    String address = request.getParameter("address");
    int zipCode = Integer.parseInt(request.getParameter("zipCode"));
    int ssn = Integer.parseInt(request.getParameter("ssn"));
    Double hourlyRate = Double.parseDouble(request.getParameter("hourlyRate"));
    String startDate = request.getParameter("startDate");
    String password = request.getParameter("password");
    
    try {
        DB data = new DB();
        Connection conn = data.getConnection();
        Statement st = null;
        st = conn.createStatement();
        st.executeUpdate("update Users set Email='" + email 
                + "',LastName='" + lastName + "',FirstName='" + firstName 
                + "',Address='" + address + "',ZipCode='" + zipCode 
                + "',SSN='" + ssn + "',HourlyRate='" + hourlyRate
                + "',StartDate='" + startDate 
                + "',Password='" + password 
                +"' where Id='" + num + "'");
        response.sendRedirect("employeeList.jsp");
    } catch (Exception e) {
        System.out.println(e);
    }
%>